Integrand size = 35, antiderivative size = 266 \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=-\frac {(47 A+24 C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 a^{3/2} d}+\frac {(17 A+9 C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}-\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac {3 (7 A+4 C) \sin (c+d x)}{8 a d \sqrt {a+a \sec (c+d x)}}-\frac {(13 A+6 C) \cos (c+d x) \sin (c+d x)}{12 a d \sqrt {a+a \sec (c+d x)}}+\frac {(5 A+3 C) \cos ^2(c+d x) \sin (c+d x)}{6 a d \sqrt {a+a \sec (c+d x)}} \]
[Out]
Time = 0.95 (sec) , antiderivative size = 266, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {4170, 4107, 4005, 3859, 209, 3880} \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=-\frac {(47 A+24 C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{8 a^{3/2} d}+\frac {(17 A+9 C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {3 (7 A+4 C) \sin (c+d x)}{8 a d \sqrt {a \sec (c+d x)+a}}+\frac {(5 A+3 C) \sin (c+d x) \cos ^2(c+d x)}{6 a d \sqrt {a \sec (c+d x)+a}}-\frac {(A+C) \sin (c+d x) \cos ^2(c+d x)}{2 d (a \sec (c+d x)+a)^{3/2}}-\frac {(13 A+6 C) \sin (c+d x) \cos (c+d x)}{12 a d \sqrt {a \sec (c+d x)+a}} \]
[In]
[Out]
Rule 209
Rule 3859
Rule 3880
Rule 4005
Rule 4107
Rule 4170
Rubi steps \begin{align*} \text {integral}& = -\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {\int \frac {\cos ^3(c+d x) \left (-a (5 A+3 C)+\frac {1}{2} a (7 A+3 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{2 a^2} \\ & = -\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac {(5 A+3 C) \cos ^2(c+d x) \sin (c+d x)}{6 a d \sqrt {a+a \sec (c+d x)}}-\frac {\int \frac {\cos ^2(c+d x) \left (a^2 (13 A+6 C)-\frac {5}{2} a^2 (5 A+3 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{6 a^3} \\ & = -\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {(13 A+6 C) \cos (c+d x) \sin (c+d x)}{12 a d \sqrt {a+a \sec (c+d x)}}+\frac {(5 A+3 C) \cos ^2(c+d x) \sin (c+d x)}{6 a d \sqrt {a+a \sec (c+d x)}}-\frac {\int \frac {\cos (c+d x) \left (-\frac {9}{2} a^3 (7 A+4 C)+\frac {3}{2} a^3 (13 A+6 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{12 a^4} \\ & = -\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac {3 (7 A+4 C) \sin (c+d x)}{8 a d \sqrt {a+a \sec (c+d x)}}-\frac {(13 A+6 C) \cos (c+d x) \sin (c+d x)}{12 a d \sqrt {a+a \sec (c+d x)}}+\frac {(5 A+3 C) \cos ^2(c+d x) \sin (c+d x)}{6 a d \sqrt {a+a \sec (c+d x)}}-\frac {\int \frac {\frac {3}{4} a^4 (47 A+24 C)-\frac {9}{4} a^4 (7 A+4 C) \sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx}{12 a^5} \\ & = -\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac {3 (7 A+4 C) \sin (c+d x)}{8 a d \sqrt {a+a \sec (c+d x)}}-\frac {(13 A+6 C) \cos (c+d x) \sin (c+d x)}{12 a d \sqrt {a+a \sec (c+d x)}}+\frac {(5 A+3 C) \cos ^2(c+d x) \sin (c+d x)}{6 a d \sqrt {a+a \sec (c+d x)}}+\frac {(17 A+9 C) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx}{4 a}-\frac {(47 A+24 C) \int \sqrt {a+a \sec (c+d x)} \, dx}{16 a^2} \\ & = -\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac {3 (7 A+4 C) \sin (c+d x)}{8 a d \sqrt {a+a \sec (c+d x)}}-\frac {(13 A+6 C) \cos (c+d x) \sin (c+d x)}{12 a d \sqrt {a+a \sec (c+d x)}}+\frac {(5 A+3 C) \cos ^2(c+d x) \sin (c+d x)}{6 a d \sqrt {a+a \sec (c+d x)}}-\frac {(17 A+9 C) \text {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{2 a d}+\frac {(47 A+24 C) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 a d} \\ & = -\frac {(47 A+24 C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 a^{3/2} d}+\frac {(17 A+9 C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}-\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac {3 (7 A+4 C) \sin (c+d x)}{8 a d \sqrt {a+a \sec (c+d x)}}-\frac {(13 A+6 C) \cos (c+d x) \sin (c+d x)}{12 a d \sqrt {a+a \sec (c+d x)}}+\frac {(5 A+3 C) \cos ^2(c+d x) \sin (c+d x)}{6 a d \sqrt {a+a \sec (c+d x)}} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 2.89 (sec) , antiderivative size = 427, normalized size of antiderivative = 1.61 \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\frac {\sec (c+d x) \left (408 \sqrt {2} A \text {arctanh}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right ) \sin (c+d x)+216 \sqrt {2} C \text {arctanh}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right ) \sin (c+d x)+357 A \sqrt {1-\sec (c+d x)} \sin (c+d x)+144 C \sqrt {1-\sec (c+d x)} \sin (c+d x)+102 A \cos ^2(c+d x) \sqrt {1-\sec (c+d x)} \sin (c+d x)+88 A \cos ^3(c+d x) \sqrt {1-\sec (c+d x)} \sin (c+d x)+\frac {323}{2} A \sqrt {1-\sec (c+d x)} \sin (2 (c+d x))+48 C \sqrt {1-\sec (c+d x)} \sin (2 (c+d x))+408 \sqrt {2} A \text {arctanh}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right ) \tan (c+d x)+216 \sqrt {2} C \text {arctanh}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right ) \tan (c+d x)-9 (51 A+32 C) \text {arctanh}\left (\sqrt {1-\sec (c+d x)}\right ) (\sin (c+d x)+\tan (c+d x))-336 A \operatorname {Hypergeometric2F1}\left (\frac {1}{2},4,\frac {3}{2},1-\sec (c+d x)\right ) \sqrt {1-\sec (c+d x)} (\sin (c+d x)+\tan (c+d x))\right )}{96 d \sqrt {1-\sec (c+d x)} (a (1+\sec (c+d x)))^{3/2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(1007\) vs. \(2(231)=462\).
Time = 0.85 (sec) , antiderivative size = 1008, normalized size of antiderivative = 3.79
[In]
[Out]
none
Time = 3.28 (sec) , antiderivative size = 668, normalized size of antiderivative = 2.51 \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\left [-\frac {6 \, \sqrt {2} {\left ({\left (17 \, A + 9 \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (17 \, A + 9 \, C\right )} \cos \left (d x + c\right ) + 17 \, A + 9 \, C\right )} \sqrt {-a} \log \left (\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, a \cos \left (d x + c\right )^{2} + 2 \, a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 3 \, {\left ({\left (47 \, A + 24 \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (47 \, A + 24 \, C\right )} \cos \left (d x + c\right ) + 47 \, A + 24 \, C\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) - 2 \, {\left (8 \, A \cos \left (d x + c\right )^{4} - 6 \, A \cos \left (d x + c\right )^{3} + {\left (37 \, A + 24 \, C\right )} \cos \left (d x + c\right )^{2} + 9 \, {\left (7 \, A + 4 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{48 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}}, -\frac {6 \, \sqrt {2} {\left ({\left (17 \, A + 9 \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (17 \, A + 9 \, C\right )} \cos \left (d x + c\right ) + 17 \, A + 9 \, C\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - 3 \, {\left ({\left (47 \, A + 24 \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (47 \, A + 24 \, C\right )} \cos \left (d x + c\right ) + 47 \, A + 24 \, C\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - {\left (8 \, A \cos \left (d x + c\right )^{4} - 6 \, A \cos \left (d x + c\right )^{3} + {\left (37 \, A + 24 \, C\right )} \cos \left (d x + c\right )^{2} + 9 \, {\left (7 \, A + 4 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{24 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}}\right ] \]
[In]
[Out]
\[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\int \frac {\left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}}{\left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \]
[In]
[Out]
\[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\int { \frac {{\left (C \sec \left (d x + c\right )^{2} + A\right )} \cos \left (d x + c\right )^{3}}{{\left (a \sec \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 815 vs. \(2 (231) = 462\).
Time = 2.31 (sec) , antiderivative size = 815, normalized size of antiderivative = 3.06 \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\int \frac {{\cos \left (c+d\,x\right )}^3\,\left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \]
[In]
[Out]